package com.eastfair.certificate.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 制证模板详情
 * </p>
 *
 * @author ligang
 * @since 2023-05-25
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cert_badge_template_detail")
@ApiModel(value = "BadgeTemplateDetail", description = "制证模板详情")
@AllArgsConstructor
public class BadgeTemplateDetail extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 模板id
     */
    @ApiModelProperty(value = "模板id")
    @TableField(value = "template_id")
    @Excel(name = "模板id")
    private Long templateId;

    /**
     * 字段
     */
    @ApiModelProperty(value = "字段")
    @Size(max = 255, message = "字段长度不能超过255")
    @TableField(value = "field", condition = LIKE)
    @Excel(name = "字段")
    private String field;

    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    @Size(max = 255, message = "名称长度不能超过255")
    @TableField(value = "name", condition = LIKE)
    @Excel(name = "名称")
    private String name;

    /**
     * 值类型
     */
    @ApiModelProperty(value = "值类型")
    @Size(max = 255, message = "值类型长度不能超过255")
    @TableField(value = "value_type", condition = LIKE)
    @Excel(name = "值类型")
    private String valueType;

    /**
     * 前缀
     */
    @ApiModelProperty(value = "前缀")
    @Size(max = 255, message = "前缀长度不能超过255")
    @TableField(value = "prefix_field", condition = LIKE)
    @Excel(name = "前缀")
    private String prefixField;

    /**
     * 字段值
     */
    @ApiModelProperty(value = "字段值")
    @Size(max = 255, message = "字段值长度不能超过255")
    @TableField(value = "value", condition = LIKE)
    @Excel(name = "字段值")
    private String value;

    /**
     * 上侧距离
     */
    @ApiModelProperty(value = "上侧距离")
    @TableField(value = "top_size")
    @Excel(name = "上侧距离")
    private Double topSize;

    /**
     * 左侧距离
     */
    @ApiModelProperty(value = "左侧距离")
    @TableField(value = "left_size")
    @Excel(name = "左侧距离")
    private Double leftSize;

    /**
     * 打印宽度(会控制换行)
     */
    @ApiModelProperty(value = "打印宽度(会控制换行)")
    @Size(max = 128, message = "打印宽度(会控制换行)长度不能超过128")
    @TableField(value = "print_range_width", condition = LIKE)
    @Excel(name = "打印宽度(会控制换行)")
    private String printRangeWidth;

    /**
     * 打印高度(会控制显示的高度)
     */
    @ApiModelProperty(value = "打印高度(会控制显示的高度)")
    @Size(max = 128, message = "打印高度(会控制显示的高度)长度不能超过128")
    @TableField(value = "print_range_height", condition = LIKE)
    @Excel(name = "打印高度(会控制显示的高度)")
    private String printRangeHeight;

    /**
     * 字体大小
     */
    @ApiModelProperty(value = "字体大小")
    @TableField(value = "size")
    @Excel(name = "字体大小")
    private Integer size;

    /**
     * 是否下滑线 1代表有下划线,0代表无下划线
     */
    @ApiModelProperty(value = "是否下滑线 1代表有下划线,0代表无下划线")
    @TableField(value = "underline")
    @Excel(name = "是否下滑线 1代表有下划线,0代表无下划线")
    private Integer underline;

    /**
     * 是否斜体 1斜体 0不斜体
     */
    @ApiModelProperty(value = "是否斜体 1斜体 0不斜体")
    @TableField(value = "tilt")
    @Excel(name = "是否斜体 1斜体 0不斜体")
    private Integer tilt;

    /**
     * 是否粗体 1代表粗体,0代表非粗体
     */
    @ApiModelProperty(value = "是否粗体 1代表粗体,0代表非粗体")
    @TableField(value = "thickening")
    @Excel(name = "是否粗体 1代表粗体,0代表非粗体")
    private Integer thickening;

    /**
     * 左右靠齐方式 1左靠齐, 2居中,3右靠齐
     */
    @ApiModelProperty(value = "左右靠齐方式 1左靠齐, 2居中,3右靠齐")
    @TableField(value = "text_to_lcr")
    @Excel(name = "左右靠齐方式 1左靠齐, 2居中,3右靠齐")
    private Integer textToLcr;

    /**
     * 样式内容
     */
    @ApiModelProperty(value = "样式内容")

    @TableField(value = "style_txt", condition = LIKE)
    @Excel(name = "样式内容")
    private String styleTxt;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 是否可用，1是；0否
     */
    @ApiModelProperty(value = "是否可用，1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否可用，1是；0否")
    private Integer isEnabled;

    /**
     * 做备注用,和业务无关,!!!禁止使用!!!
     */
    @ApiModelProperty(value = "做备注用,和业务无关,!!!禁止使用!!!")
    @Size(max = 65535, message = "做备注用,和业务无关,!!!禁止使用!!!长度不能超过65535")
    @TableField(value = "remark_1", condition = LIKE)
    @Excel(name = "做备注用,和业务无关,!!!禁止使用!!!")
    private String remark1;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 团队id
     */
    @ApiModelProperty(value = "团队id")
    @TableField(value = "team_id")
    @Excel(name = "团队id")
    private Long teamId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;


    @Builder
    public BadgeTemplateDetail(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Long templateId, String field, String name, String valueType, String prefixField, 
                    String value, Double topSize, Double leftSize, String printRangeWidth, String printRangeHeight, Integer size, 
                    Integer underline, Integer tilt, Integer thickening, Integer textToLcr, String styleTxt, Integer isDeleted, 
                    Integer isEnabled, String remark1, Long tenantId, Long projectId, Long teamId, Long subsystemId) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.templateId = templateId;
        this.field = field;
        this.name = name;
        this.valueType = valueType;
        this.prefixField = prefixField;
        this.value = value;
        this.topSize = topSize;
        this.leftSize = leftSize;
        this.printRangeWidth = printRangeWidth;
        this.printRangeHeight = printRangeHeight;
        this.size = size;
        this.underline = underline;
        this.tilt = tilt;
        this.thickening = thickening;
        this.textToLcr = textToLcr;
        this.styleTxt = styleTxt;
        this.isDeleted = isDeleted;
        this.isEnabled = isEnabled;
        this.remark1 = remark1;
        this.tenantId = tenantId;
        this.projectId = projectId;
        this.teamId = teamId;
        this.subsystemId = subsystemId;
    }

}
